The NBP Entity Structure
You use an NBP entity to more conveniently manipulate NBP names because it allows you to extract and set the NBP name's three parts (name, type, and zone) separately. Its use is optional under Open Transport, but it provides an easier way to port programs written for classic AppleTalk. There are many AppleTalk utility functions that transfer data between NBP entity structures and NBP names.The NBP entity structure is defined by the
NBPEntity
data type.
struct NBPEntity { UInt8 fEntity[kNBPMaxEntityLength]; };FIELD DESCRIPTIONS
fEntity
- An 8-bit number that specifies the NBP entity you wish to use to hold the NBP name.
- The NBP entity holds an NBP name in the form name:type@zone, and the constant
kNBPMaxEntityLength
specifies the maximum size of the buffer, currently defined to be 99 bytes. This permits an NBP name whose name, type, and zone contain the maximum 32 characters each plus a length byte. The NBP entity itself does not contain escape characters, but the NBP entity extraction functions add them as necessary when converting NBP name strings from NBP entities.